// src/store/apiSlice/departmentApiSlice.ts
import { apiSlice } from "@store/apiSlice/index";

export const departmentApiSlice = apiSlice.injectEndpoints({
    endpoints: (builder) => ({
        // 获取科室列表
        requestDepartments: builder.query<DepartmentResponse, undefined>({
            query: () => ({ url: "/dep/all" }),
        }),
    }),
});

export const { useRequestDepartmentsQuery } = departmentApiSlice;